// pages/personal/personal.js
//const utils= require('../../utils/util')

Page({

  /**
   * Page initial data
   */
  data: {
    avartal:'',
    name:getApp().globalData.name,
    duty:getApp().globalData.staff_duty,
    org:getApp().globalData.staff_org,
    number:getApp().globalData.staff_number,
    phone:getApp().globalData.phone,
  },


   show_modal(){
    const childComponent = this.selectComponent('#modal');
    childComponent.clickme();
  },


  getAddInfo(){
       console.log("父组件接收到通知")
      this.setData({
        avartal:getApp().globalData.staff_picture,
      })
  },

  /**
   * Lifecycle function--Called when page load
   */
  onLoad(options) {
    this.setData({
      avartal:getApp().globalData.staff_picture
    })
  },

  /**
   * Lifecycle function--Called when page is initially rendered
   */
  onReady() {
   
  },

  /**
   * Lifecycle function--Called when page show
   */
  onShow() {
    console.log("onShow")
  },

  /**
   * Lifecycle function--Called when page hide
   */
  onHide() {

  },

  /**
   * Lifecycle function--Called when page unload
   */
  onUnload() {

  },

  /**
   * Page event handler function--Called when user drop down
   */
  onPullDownRefresh() {

  },

  /**
   * Called when page reach bottom
   */
  onReachBottom() {

  },

  /**
   * Called when user click on the top right corner to share
   */
  onShareAppMessage() {

  }
})